from sys import argv, path
"""
argv meant to contain an index as its first arg, and the location of 
the input file in its second.
"""

path.append('/net/home/lxtsfs1/tpa/criger/Documents/temp_shared_data/trajectory_run_dir/')
from c_traj import get_trajectory
import cPickle as pickle

input_file = "trajectory_input_file"
with open(input_file, 'r') as file:
    input_dict = pickle.load(file)

print type(input_dict['tvec'])

output_dict = get_trajectory(input_dict)

filename = 'pickled_output/trajectory_data'+str(argv[1])+'.pkl'

with open(filename,'w') as phile:
    pickle.dump(output_dict, phile)
